<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Vue</title>
    <link rel="stylesheet" href="/css/common.css">
    <style>
        .info {
            border: 1px solid lightgray;
            padding: 4px;
            border-radius: 2px;
        }
    </style>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14"></script>
</head>
<body>
<div id="app">
    <h1>{{ appName }}</h1>
    <user-info></user-info>
</div>
<script type="text/javascript">
    Vue.component('UserInfo', {
        data: function () {
            return {account: 'admin'}
        },
        template: `<div class="info">User info: {{account}}</div>`
    })
    const app = new Vue({
        el: '#app',
        data: {
            appName: 'My App'
        }
    })
</script>
</body>
</html>
